import React from "react";
import {Button, Input} from 'antd';
import ResultGrid from "./ResultGrid/ResultGrid";

class ParentComponent extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
            inputValue: ''
        }
    }

    handleInputChange(e) {
        this.setState({inputValue: e.target.value});
    }

    handleBtnClick() {
        alert(this.state.inputValue);
    }

    render() {
        return (
            <div>
                <Input onChange={this.handleInputChange.bind(this)} placeholder={"please input the text"}/>
                <Button type="primary" onClick={this.handleBtnClick.bind(this)}>Click me</Button>
                <ResultGrid/>
            </div>

        )
    }
}

export default ParentComponent;